Optimal. Leaf size=47 \[ -\frac {A \sqrt {a+b x^2}}{a x}+\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {462, 223, 212}
\begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \sqrt {a+b x^2}}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 223
Rule 462
Rubi steps
\begin {align*} \int \frac {A+B x^2}{x^2 \sqrt {a+b x^2}} \, dx &=-\frac {A \sqrt {a+b x^2}}{a x}+B \int \frac {1}{\sqrt {a+b x^2}} \, dx\\ &=-\frac {A \sqrt {a+b x^2}}{a x}+B \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )\\ &=-\frac {A \sqrt {a+b x^2}}{a x}+\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 50, normalized size = 1.06 \begin {gather*} -\frac {A \sqrt {a+b x^2}}{a x}-\frac {B \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 41, normalized size = 0.87
method | result | size |
default | \(\frac {B \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}-\frac {A \sqrt {b \,x^{2}+a}}{a x}\) | \(41\) |
risch | \(\frac {B \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}-\frac {A \sqrt {b \,x^{2}+a}}{a x}\) | \(41\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 33, normalized size = 0.70 \begin {gather*} \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} - \frac {\sqrt {b x^{2} + a} A}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.58, size = 109, normalized size = 2.32 \begin {gather*} \left [\frac {B a \sqrt {b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) - 2 \, \sqrt {b x^{2} + a} A b}{2 \, a b x}, -\frac {B a \sqrt {-b} x \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) + \sqrt {b x^{2} + a} A b}{a b x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.76, size = 99, normalized size = 2.11 \begin {gather*} - \frac {A \sqrt {b} \sqrt {\frac {a}{b x^{2}} + 1}}{a} + B \left (\begin {cases} \frac {\sqrt {- \frac {a}{b}} \operatorname {asin}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b < 0 \\\frac {\sqrt {\frac {a}{b}} \operatorname {asinh}{\left (x \sqrt {\frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b > 0 \\\frac {\sqrt {- \frac {a}{b}} \operatorname {acosh}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- a}} & \text {for}\: b > 0 \wedge a < 0 \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.93, size = 58, normalized size = 1.23 \begin {gather*} -\frac {B \log \left ({\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2}\right )}{2 \, \sqrt {b}} + \frac {2 \, A \sqrt {b}}{{\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.36, size = 40, normalized size = 0.85 \begin {gather*} \frac {B\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}-\frac {A\,\sqrt {b\,x^2+a}}{a\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________